﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GroupCheer.Common;

namespace GroupCheer
{
    public partial class CreateGoal : System.Web.UI.Page
    {
        oAuthFacebookApi oAuth = null;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request["code"] == null)
            {
                //Redirect the user back to Facebook for authorization. 
                Response.Redirect(oAuthFacebookApi.Instance.AuthorizationLinkGet());
            }
            else
            {
                try
                {
                    //Get the access token and secret. 
                    oAuthFacebookApi.Instance.AccessTokenGet(Request["code"]);

                    if (oAuthFacebookApi.Instance.Token.Length > 0)
                    {
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
        }

        protected void btnSave_Click(object sender, EventArgs e)
        {
            Response.Redirect("GoalInfo.aspx");
        }
    }
}
